package semantic.rules.walk

import syntax.{CGrammar, CASTNode}
import scala.collection.mutable.Buffer
import semantic.COperations._
import CGrammar.CAssign
import utils.data.CTree

object CWalkRuleAssign extends CWalkRule
{
    override val categories = CAssign:: Nil

    override def post(node:CASTNode)(implicit tree:CTree[CASTNode], code:Buffer[String]) =
        code += s"""$PUSH "${node().firstChild().value}"""" += BIND
}
